
<div class="mod-project-collection project-collection-manage">
  <div class="mod-option">
    <button class="ui-btn ui-btn-lg ui-btn-bright" ui-sref="createProjectCollection"><span class="btn-txt">新建项目</span><i class="fa fa-plus"></i></button>
    <div class="pull-right right-option"><span ng-cloak="ng-cloak">共{{collectionFilter.length}}个项目</span>
      <input class="ui-input-search ui-input-fill" type="text" placeholder="输入项目名称查询" ng-model="proKeywards"/>
    </div>
  </div>
  <loading ng-if="isLoading"></loading>
  <div class="mod-tips-info">
    <p class="txt-prompt"><i class="fa fa-info-circle icon-algin-right"></i>项目是工程的集合，用来控制一组工程的访问权限。</p>
  </div>
  <ul class="project-collection-list">
    <li class="no-project-collection" ng-if="!isLoading&amp;&amp;(!projectCollectionList||collectionFilter.length===0)"><span>暂无项目，可以新建一个</span></li>
    <li ng-repeat="projectCollection in collectionFilter = (projectCollectionList |filter:{name:proKeywards}|orderBy:'createTime':true)">
      <div class="project-collection-item text-center">
        <div class="project-collection-header"><a class="project-collection-name" ui-sref="projectManage({'id':projectCollection.id})" ng-bind="projectCollection.name"></a><span class="pull-right build-project-collection-title pull-right-margin">
            <button class="fa fa-pencil ui-btn-none" ng-if="!projectCollection.isEdit" ng-click="projectCollection.isEdit = true" ng-class="{true:'icon-edit-color',false:'icon-fa-disabled'}[projectCollection.role==='MASTER'||projectCollection.role==='DEVELOPER']" ng-disabled="!(projectCollection.role==='MASTER'||projectCollection.role==='DEVELOPER')" tooltip="编辑"></button>
            <button class="fa fa-trash-o ui-btn-none icon-trash-color" ng-if="!projectCollection.isEdit" ng-click="deleteProjectCollection(projectCollection.id)" ng-class="{true:'icon-trash-color',false:'icon-fa-disabled'}[projectCollection.role==='MASTER']" ng-disabled="!(projectCollection.role==='MASTER')" tooltip="删除"></button>
            <button class="fa fa-floppy-o ui-btn-none icon-success-color" ng-if="projectCollection.isEdit" ng-click="saveEdit(projectCollection);projectCollection.isEdit = false" tooltip="保存"></button>
            <button class="fa fa-times ui-btn-none icon-cancel-color" ng-if="projectCollection.isEdit" ng-click="cancelEdit();projectCollection.isEdit = false" tooltip="取消"></button></span></div>
        <div class="project-collection-content"><em class="txt-success" ng-show="projectCollection.projectCollectionState==='PUBLIC'">公开项目</em><em class="txt-error" ng-show="projectCollection.projectCollectionState==='PRIVATE'">私有项目</em>
          <div class="project-collection-info-description" ng-show="!projectCollection.isEdit" title="{{projectCollection.description}}">{{projectCollection.description || '此项目无描述信息'}}</div>
          <div class="project-collection-info-description" ng-show="projectCollection.isEdit">
            <textarea class="ui-input-fill textarea-edit" ng-model="projectCollection.description" name="collectionDescription" required="required"></textarea>
          </div>
        </div>
        <div class="project-collection-content content-last"><span class="project-collection-info col">工程数：<span class="txt-bright" ng-cloak="ng-cloak">{{projectCollection.projectCount}}</span></span><span class="project-collection-info col">成员数：<span class="txt-success" ng-cloak="ng-cloak">{{projectCollection.memberCount}}</span></span><span class="project-collection-info create-time-size">创建时间：{{projectCollection.createTime|date:'yyyy-MM-dd'}}</span><span class="project-collection-info">创建者：{{projectCollection.creatorInfo.name}}</span></div>
      </div>
    </li>
  </ul>
</div>